package other_其他模式.front_controller_pattern_前端控制器模式;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: hihi
 * @Date: 2020/07/10/11:20
 * @Description:
 */
public class Dispatcher {

	private HomeView homeView;
	private StudentView studentView;

	public Dispatcher() {
		homeView = new HomeView();
		studentView = new StudentView();
	}

	public void dispatcher(String request) {
		if ("home".equalsIgnoreCase(request)) {
			homeView.show();
		} else {
			studentView.show();
		}
	}
}
